package com.spoto.oa.dao;

import java.sql.SQLException;
import java.util.List;

import com.spoto.oa.model.Employee;

/**
 * 
 * @Project_name: OA
 * @Description: 员工信息表数据库操作的封装
 * @Author: LinYiSong
 * @Version: 
 * @Date: 2010-9-23~2010-9-23
 */
public interface EmployeeDAO {

	/**
	 * 根据用户名返回对应的员工信息
	 * @param username
	 * @return
	 */
	public List<Employee> selectByUsername(String username);
	
	public Employee getByUsername(String username);
	
	public Employee getByUsernameConfict(String username);
	
	/**
	 * 新增员工
	 * @param employee
	 * @throws SQLException 
	 */
	public void save(Employee employee) throws SQLException;
	/**
	 * 根据姓名查找对应的员工
	 * @param name
	 * @return
	 */
	public List<Employee> selectByName(String name);
	
	/**
	 * 删出员工
	 * @param employee
	 */
	public void delete(Employee employee);
	
	/**
	 * 删出员工
	 * @param employee
	 */
	public void deleteConfict(Employee employee);
	
	
	/**
	 * 更新员工
	 * @param username
	 */
	public void update(Employee employee);
	/**
	 * 取得所有的信息
	 * @return
	 */
	public List<Employee> getAll();
	
	/**
	 * 取得所有冲突的信息
	 * @return
	 */
	public List<Employee> getAllConfict();
	
	/**
	 * 存上传冲突的员工数据
	 * @param e
	 * @throws SQLException 
	 */
	public void saveConfict(Employee e) throws SQLException;

	public void deleteByUsername(String username);
	/**
	 * 根据qq模糊查询
	 * @param qq
	 * @return
	 */
	public List<Employee> getByQq(String qq);
	/**
	 * 根据手机号模糊查询
	 * @param cell
	 * @return
	 */
	public List<Employee> getAllByCell(String cell);
	
	/**
	 * 修改用户密码
	 * @param username
	 * @param psw
	 */
	public void updatePsw(String username,String psw);
}
